#ifndef __WITH_POSIX_THREAD__
#define __WITH_POSIX_THREAD__

#include <thread.h>
#include <pthread.h>

typedef enum { NOT_CREATED, WAITING, 
    RUNNING, DESTROYED } current_state;

class PosixThread : public Thread
{
public:
    virtual int lock();
    virtual int unlock();
    PosixThread();
    virtual ~PosixThread();
private :
    pthread_mutex_t  _mutex;
    pthread_t         _thread_id;   
    current_state    _state;

}; 

#endif
